package isanfeng.tuxiaoer.pattern.structural.proxy.dynamicproxy;

import isanfeng.tuxiaoer.pattern.structural.proxy.IOrderService;
import isanfeng.tuxiaoer.pattern.structural.proxy.Order;
import isanfeng.tuxiaoer.pattern.structural.proxy.OrderServiceImpl;

/**
 * @author 李红辉
 * @version 1.0
 * @date 2019/10/14 11:42
 */
public class Test {
    public static void main(String[] args) {
        Order order = new Order();
        order.setUserId(2);
        IOrderService iOrderServiceDynamicProxy = (IOrderService) new OrderServiceDynamicProxy(new OrderServiceImpl()).bind();
        iOrderServiceDynamicProxy.saveOrder(order);
    }
}
